package com.uw.gateway.handler.web;

import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebHandler;
import reactor.core.publisher.Mono;

import java.nio.charset.StandardCharsets;



@Component
public class UwGatewayWebHandler implements WebHandler {

    @Override
    public Mono<Void> handle(ServerWebExchange exchange) {
        return exchange.getResponse().writeWith(Mono.just(exchange.getResponse().bufferFactory().wrap("hello uw web handler".getBytes(StandardCharsets.UTF_8))));
    }
}
